package cn.qinyun.cloud.core.web.config;

import cn.qinyun.cloud.common.factory.YamlPropertySourceFactory;
import cn.qinyun.cloud.core.web.props.QinYunSwaggerProperties;
import lombok.AllArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;

/**
 * 类名称：SwaggerConfiguration <br>
 * 类描述：TODO <br>
 *
 * @author 张兆发
 * @date 创建时间：2021/7/16  2:43 下午 <br>
 * @version 1.0.0
 */
@Configuration
@EnableSwagger2WebMvc
@AllArgsConstructor
//@Profile({"!prod"})
@Import(BeanValidatorPluginsConfiguration.class)
@EnableConfigurationProperties(QinYunSwaggerProperties.class)
@PropertySource(factory = YamlPropertySourceFactory.class, value = "classpath:mate-swagger.yml")
public class SwaggerConfiguration implements WebMvcConfigurer {
}
